package com.piece.module.spider.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@NoArgsConstructor
@Table(name = "sp_variable")
@ApiModel(value = "爬虫变量表:sp_variable")
public class Variable {

	@Id
	@Column(name = "id", length = 11)
	@ApiModelProperty(value = "主键")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@Column(name = "name")
	@ApiModelProperty(value = "变量名称")
	private String name;

	@Column(name = "value")
	@ApiModelProperty(value = "变量值")
	private String value;

	@Column(name = "description")
	@ApiModelProperty(value = "变量描述")
	private String description;

	@Column(name = "create_date")
	@ApiModelProperty(value = "创建时间")
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date createDate;
}
